<template>
    <div>
        <el-tree
    :data="data"
    show-checkbox
    :props="defaultProps"
  />
    </div>
</template>

<script lang="ts" setup>
import { ref } from "vue" 
import { useRoute } from 'vue-router'
import { treeListApi } from "./api";

const defaultProps = {
    children: 'children',
    label: 'title',
}
const route = useRoute()
const data = ref<ITreeList[]>()
treeListApi().then(res=>{
    if(res.code===200){
        data.value = res.data
    }
})


</script>

<style lang="scss" scoped>

</style>